<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery.min.js"></script>
</head>

<body>
    <button>1</button>
    <button>2</button>
    <button>3</button>
    <button>4</button>
    <button>5</button>
    <script>
        $(function() {
            $("button").click(function(){
                // 当前的元素不变颜色
                // $(this).css("background","pink");
                // 其余的兄弟去掉颜色
                // $(this).siblings("button").css("background","");

                // 链式编程
                $(this).css("background", "pink").siblings("button").css("background", "")
            })
        })
    </script>
</body>

</html>